
const getFileTree = async (data) => {
    return request({
        url: '/file/tree',
        method: 'GET',
        data: data
    })
}

const deleteFile = async (data) => {
    return request({
        url: '/file/delete',
        method: 'POST',
        data: data
    })
}

const renameFile = async(data) => {
    return request({
        url: '/file/rename',
        method: 'POST',
        data: data
    })
}

const deleteFolder = async(data) => {
    return request({
        url: '/file/folder/delete',
        method: 'POST',
        data
    })
}

const newFile = async(data) => {
    return request({
        url: '/file/new',
        method: 'POST',
        data
    })
}

const newFolder = async(data) => {
    return request({
        url: '/file/folder/new',
        method: 'POST',
        data
    })
}


export default {
    getFileTree,
    deleteFile,
    renameFile,
    deleteFolder,
    newFile,
    newFolder
    
}